﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Text;
using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface;

namespace OpenAuth.App
{
    public class CYYGH007App : ApiBaseApp<CYYGH007>
    {
        public CYYGH007App(IApiRepository<CYYGH007> repository) : base(repository)
        {
        }
        /// <summary>
        /// 预约医生号源信息查询（预约医生号源查询）
        /// </summary>
        /// <param name="ysdm">医生代码</param>
        /// <param name="ksrq">开始日期</param>
        /// <param name="jsrq">结束日期</param>
        /// <param name="zzlx">坐诊时间类型</param>
        /// <returns></returns>
        public IEnumerable<CYYGH007> QueryCYYGH007ByYsdm(string ysdm, string ksrq, string jsrq, string zzlx)
        {
            List<SqlParameter> param = new List<SqlParameter>();
            param.Add(new SqlParameter("@Ysdm", ysdm));
            param.Add(new SqlParameter("@Ksrq", ksrq));
            param.Add(new SqlParameter("@Jsrq", jsrq));
            param.Add(new SqlParameter("@Zzlx", zzlx));
            param.Add(new SqlParameter("@Czyh", "hf001"));
            var result = Query<CYYGH007>("exec usp_web_webtrans_CYYGH007 @ysdm=@Ysdm,@ksrq=@Ksrq,@jsrq=@Jsrq,@zzlx=@Zzlx,@czyh=@Czyh", param);
            return result;
        }
    }
}
